﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Netra
{
    partial class GalaxyMenuPlanetsForm : Netra.GalaxyMenuForm
    {
        private List<Planet> Planets;

        #region Constructors
        public GalaxyMenuPlanetsForm()
        {
            InitializeComponent();
            InitializeComponentsByHand();
        }

        public GalaxyMenuPlanetsForm(Galaxy _galaxy)
        {
            galaxy = _galaxy;
            InitializeComponent();
            InitializeComponentsByHand();
        }
        #endregion Constructors

        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            //System.Console.WriteLine(sender.ToString());
            //System.Console.WriteLine(e.ToString());
            //System.Console.WriteLine(dataGridView1.Rows[((DataGridViewCellEventArgs)e).RowIndex].DataBoundItem);
            PlanetDetailsForm planetDetails = new PlanetDetailsForm((Planet)(dataGridView1.Rows[((DataGridViewCellEventArgs)e).RowIndex].DataBoundItem));
            this.AddOwnedForm(planetDetails);
            planetDetails.Show();
        }
    }
}
